package app.texas.com.devilfishhouse.Base;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.View;

import com.universal_library.fragment.BaseFragment;

import butterknife.ButterKnife;

/**
 * Created by solin on 2018/7/16.
 */

public abstract class BaseFragmentView extends BaseFragment implements BaseIView {
    protected BasePresenter mPresenter;

    @Override
    protected void initView(View view) {
        ButterKnife.bind(this, view);

    }

    @Override
    public void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        mPresenter = getPresenter();
        mPresenter.oncreate();
    }

    protected abstract BasePresenter getPresenter();

    @Override
    public void onResume() {
        super.onResume();
        mPresenter.onResume();
    }

    @Override
    public void onDestroy() {
        super.onDestroy();
        mPresenter.onDestory();
    }

    //绑定数据
    @Override
    public void setData(Object data) {

    }
}
